Skip to content

Fix receive timeout across EINTR retries - #6

Merged
han-xudong merged 1 commit into
mainfrom
fix/eintr-timeout
Jul 23, 2026
Merged

han-xudong merged 1 commit into
mainfrom
fix/eintr-timeout

Conversation

@han-xudong

Copy link
Copy Markdown
Member

Summary

Fixes #5 by tracking one monotonic receive deadline and recomputing the remaining poll timeout after EINTR. Repeated signal interruptions can no longer extend the caller-requested timeout.

A deterministic poll-wrapper regression test covers repeated EINTR and preserves non-EINTR error behavior.

Testing

  • pixi run test: 11/11 passed
  • pixi run format-check
  • Focused regression test passed 30 consecutive GCC runs
  • Fresh Clang build and focused test passed

Hardware

No hardware testing was required; the transport tests use a loopback UDP socket and wrapped poll calls.

Checklist

  • Tests were added for the behavior change.
  • pixi run format-check and pixi run test pass.
  • Public timeout behavior is preserved and corrected.
  • Hardware tests were not required.
  • ros-netft will receive the fix through a later released core snapshot.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@han-xudong, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ffc1245a-c30d-4b52-a75f-f8eaf4f9c0a4

📥 Commits

Reviewing files that changed from the base of the PR and between a35b35a and 4167a12.

📒 Files selected for processing (3)
  • src/detail/posix_transport.cpp
  • test/CMakeLists.txt
  • test/test_posix_transport.cpp
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/eintr-timeout

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.59459% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/detail/posix_transport.cpp 81.81% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@han-xudong
han-xudong merged commit fa63647 into main Jul 23, 2026
17 checks passed
@han-xudong
han-xudong deleted the fix/eintr-timeout branch July 23, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve receive timeout across EINTR retries

1 participant